The hardware virtualization technology is widely applied to fields, such as software testing and parallel computing. One or more virtual machines are created on one physical host by using the hardware virtualization technology, so that several or even tens of virtual machines share hardware resources of one physical host. Therefore, the physical host is also called a host computer.
Cloud computing centralizes data processing tasks of terminal devices and delivers the tasks to a network for execution, so that the network provides data services for users using a plurality of different terminal devices. In this way, differences of terminal devices are overcome. Distributed computing at the network side in the cloud computing becomes a new important application scenario of the hardware virtualization technology. Virtual machines on the same host computer may generate data interaction only by using a public host computer other than using a network device. Therefore, when the cloud computing is implemented by using the hardware virtualization technology, a virtual machine infected by a virus easily infects, through the host computer, other virtual machines on the same host computer. Therefore, the cloud computing is easily subject to computer viruses and network attacks.
Regarding how to detect malicious code (Malware) including the virus in the above scenario, the prior art proposes respectively installing antivirus software on each of the virtual machines on the same host computer, and detecting and removing the malicious code on the virtual machines by using the antivirus software installed in the virtual machines.
During the implementation of the present invention, the inventors find that the prior art has at least the following disadvantages: when the malicious code is executed, damage is actually caused to physical hardware such as the memory and CPU of the host computer instead of logical virtual machines. However, in the solution of the prior art, it is required that all virtual machines on the same host computer be installed with antivirus software respectively, and that malicious code detection be performed on the virtual machines. Consequently, this solution has the following problems: the efficiency of detecting malicious code is low, and more storage resources and processing resources of the host computer are occupied.